package elsim.events

public class Event {
  final int eventTime

  public Event(int eventTime) {
    this.eventTime = eventTime
  }

  @Override
  public String toString() {
    return String.format("Event [eventTime=%d]", eventTime);
  }
}

public class LiftEvent extends Event {
  final int liftId

  public LiftEvent(int liftId, int eventTime) {
    super(eventTime)
    this.liftId = liftId
  }

  @Override
  public String toString() {
    return String.format("LiftEvent [liftId=%d, toString()=%s]", liftId, super.toString());
  }
}

public class FailEvent extends LiftEvent {
  public FailEvent(int liftId, int eventTime) {
    super(liftId, eventTime);
  }

  @Override
  public String toString() {
    return String.format("FailEvent [toString()=%s, getClass()=%s, hashCode()=%s]",
    super.toString(), getClass(), hashCode());
  }
}

public class FixEvent extends LiftEvent {
  public FixEvent(int liftId, int eventTime) {
    super(liftId, eventTime);
  }

  @Override
  public String toString() {
    return String.format("FixEvent [toString()=%s, getClass()=%s, hashCode()=%s]",
    super.toString(), getClass(), hashCode());
  }
}


public class CallEvent extends Event {
  final String name
  final int from
  final int to

  public CallEvent(String name, int from, int to, int eventTime){
    super(eventTime)
    this.name = name
    this.from = from
    this.to = to
  }

  @Override
  public String toString() {
    return String.format(
    "CallEvent [name=%s, from=%d, to=%d, toString()=%s]",
    name,
    from,
    to,
    super.toString());
  }
}

public class DisplayEvent extends Event {
  public DisplayEvent(int eventTime) {
    super(eventTime);
  }

  @Override
  public String toString() {
    return String.format("DisplayEvent [toString()=%s, getClass()=%s, hashCode()=%s]",
    super.toString(), getClass(), hashCode());
  }
}

public class StatsEvent extends Event {

  public StatsEvent(int eventTime) {
    super(eventTime);
  }

  @Override
  public String toString() {
    return String.format("StatsEvent [toString()=%s, getClass()=%s, hashCode()=%s]",
    super.toString(), getClass(), hashCode());
  }
}